﻿/// <reference name="MicrosoftAjax.js"/>
/// <reference name="Dimok.Web.UI.JS.MSAjaxExtentions.js" assembly="Dimok.Web.UI"/>
Type.registerNamespace("Dimok");

Dimok.PageEvents = function() {
  Dimok.PageEvents.initializeBase(this);
  this._initEvents([
    "loanSelected", "loanDeselected",
    "usixSelected", "usixDeselected",
    "loanInserted", "loanDeleted",
    "loanBatchInserted", "loanBatchDeleted",
    "noteInserted",
    "paymentSelected","paymentDeselected","paymentDeleted",
    "uploadInfoSelected", "uploadInfoDeselected",
    "uploadExported", "uploadExportError",
    "purchaseBatchesSelected", "purchaseBatchesDeselected",
    "borrowerUpdated","addressUpdated","employmentUpdated"
  ]);
}

Dimok.PageEvents.prototype = {
  initialize: function() {
    Dimok.PageEvents.callBaseMethod(this, 'initialize');
    //Add code here
  },
  dispose: function() {
    //Add custom dispose actions here
    Dimok.PageEvents.callBaseMethod(this, 'dispose');
  }
}
Dimok.PageEvents.registerClass('Dimok.PageEvents', motobankcorp.Component);

Type.registerNamespace("Dimok.Event");

Dimok.Event.Loan = function(gridDataItem, keys, batchItemsCount) {
  if (Object.getType(batchItemsCount) == Array) batchItemsCount = batchItemsCount.length;
  Dimok.Event.Loan.initializeBase(this);
  this._gridDataItem = gridDataItem || null;
  this._keys = keys || null;
  this._batchItemsCount = batchItemsCount || 0;
  this._inBatch = !!batchItemsCount;
  Dimok.$A(this);
}

Dimok.Event.Loan.prototype = {}
Dimok.Event.Loan.registerClass('Dimok.Event.Loan', Sys.EventArgs);

if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
